package router

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"project/api/handler"
	"project/middleware"
)

func Router(c *gin.Engine) {

	UserApi := c.Group("/api/user")
	FriendApi := c.Group("/api/friend")
	GroupApi := c.Group("/api/group")
	ZoneApi := c.Group("/api/qzone")

	c.POST("/send", handler.Send)
	c.POST("/login", handler.Login)
	c.POST("/api", middleware.PareJwt())
	c.POST("/register", handler.Register)
	c.Group("/show", handler.FriendShow)
	c.POST("/add", handler.FriendAdd)
	c.POST("/delete", handler.FriendDelete)
	c.POST("chat", handler.Chat)
	c.POST("create", handler.Create)
	fmt.Println(UserApi, FriendApi, GroupApi, ZoneApi)
}
